#ifndef __M_USART2_H
#define __M_USART2_H

#include "main.h"
#include "usart.h"

#define UART_Handle   huart2
#define DMA_Handle    hdma_usart2_rx

#define USART_DMA_REC_BUF_SIZE  256

typedef struct{

  uint8_t end_flag;
	uint16_t len;
	uint8_t buf[USART_DMA_REC_BUF_SIZE];

}UsartRecv_t;
	
extern UsartRecv_t usart_recev;
void usart2_rec_buf_clean(void);
void m_uart2_init(void);
void m_uart2_handle(void);
void m_usart2_send(uint8_t *buf,uint8_t len);
void m_usart2_recv(uint8_t *Data,uint8_t len);



#endif

